<?php if($this->show =='list'):?>
<table class="normaltable" style="clear:both;border:0px;">
<?php 
$firsttr = true;
$groupby = ""; 
$pmgroup = array("Yong_Zhang"=>"SMUS Group","Bonbon_Xia"=>"CM Group", "William_Guo" =>"CM Group", "Sissi_Lai"=>"TSK Group", "Hill_Zheng"=>"JP/KR Group", "Tony_Zhao"=>"JP/KR Group", "Genray_Lei"=>"SHP Group");
$this->taskList=array_reverse($this->taskList);
foreach($this->taskList as $task): 
	if ($this->dimension == "PM") {
		$thisgroup = $pmgroup[$task[$this->dimension]];
	} else {
		$thisgroup = $task[$this->dimension];
	}
	if ($groupby != $thisgroup){
		$groupby = $thisgroup;
		if (!$firsttr) {
?>
	<tr>		
		<td colspan="10" style="border:0px solid #999; border-bottom:0px; height:20px;"></td>
	</tr>
	<?php } ?>
	<tr>
		<td style="background-color:#FF33FF;border:1px solid #999;" colspan="2"><?php if(trim($groupby)==""){echo "N/A";}else{echo $groupby;}?></td>
		<td colspan="9" style="border-right:0px"></td>
	</tr>	
	<tr class="tit">
		<td style="border:1px solid #999;"><center>ID</center></td>
		<td><center>Status</center></td>
		<td><center>BIZ</center></td>
		<td><center>Task</center></td>
		<td><center>Duration</center></td>
		<td><center>PM</center></td>
		<td><center>Engineer</center></td>
		<td><center>Start</center></td>
		<td><center>End</center></td>   
		<td><center>Progress</center></td>
	</tr>
<?php } ?>
	<tr>
		<td style="border:1px solid #999;"><center><?php echo $task['id']?></center></td>
		<td><center><?php echo $task['Status']?></center></td>
		<td><center><?php echo $task['Property']?></center></td>
		<td><a href="/task/detail/id/<?php echo $task['id']?>/"><?php echo $task['title']?></a></td>
		<td><center><?php echo $task['duration']?></center></td>
		<td><center><?php echo $task['PM']?></center></td>
		<td><center><?php echo $task['Resource']?></center></td>
		<td><center><?php echo $task['date_start']?></center></td>
		<td><center><?php echo $task['date_end']?></center></td> 
		<td class="Tips_proc" title="Progress : ::<?php echo $task['progress']?>%"><center><img src="/task/process?proc=<?php echo $task['progress']?>" class="processbar"/></center></td>
	</tr>	
<?php 
$firsttr = false;
endforeach;
?>
</table>
<?php else: ?>
<?php 
foreach($this->taskList as $task){
 echo $task['title'].";".$task['progress']."\r\n";
} 
?>
<?php endif; ?>
